home *** CD-ROM | disk | FTP | other *** search
Wrap
VERSION 2.00 Begin Form Config BackColor = &H00C0C0C0& BorderStyle = 3 'Fixed Double Caption = "Configure" ClientHeight = 2910 ClientLeft = 2190 ClientTop = 2310 ClientWidth = 6180 ControlBox = 0 'False Height = 3315 Left = 2130 LinkMode = 1 'Source LinkTopic = "Form3" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 2910 ScaleWidth = 6180 Top = 1965 Width = 6300 Begin TextBox Text2 BackColor = &H00C0C0C0& BorderStyle = 0 'None FontBold = 0 'False FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 8.25 FontStrikethru = 0 'False FontUnderline = 0 'False Height = 255 Left = 3790 TabIndex = 3 Text = "Text2" Top = 2415 Width = 2000 End Begin TextBox Text1 BackColor = &H00C0C0C0& BorderStyle = 0 'None FontBold = 0 'False FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 8.25 FontStrikethru = 0 'False FontUnderline = 0 'False Height = 255 Left = 200 TabIndex = 2 Text = "Text1" Top = 2415 Width = 3375 End Begin ComboBox Combo1 BackColor = &H00C0C0C0& FontBold = 0 'False FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 8.25 FontStrikethru = 0 'False FontUnderline = 0 'False Height = 300 Left = 1920 Style = 2 'Dropdown List TabIndex = 1 Top = 1170 Width = 3615 End Begin CommandButton Command1 Cancel = -1 'True Caption = "Cancel" Height = 375 Index = 1 Left = 4965 TabIndex = 5 Top = 675 Width = 1095 End Begin CommandButton Command1 Caption = "Okay" Default = -1 'True Height = 375 Index = 0 Left = 4965 TabIndex = 4 Top = 165 Width = 1095 End Begin Label Label3 BackColor = &H00C0C0C0& Caption = "Configuration Name System File" Height = 195 Left = 200 TabIndex = 7 Top = 2025 Width = 5655 End Begin Label Label2 BackColor = &H00C0C0C0& Caption = "Edit configuration:" Height = 255 Left = 200 TabIndex = 6 Top = 1200 Width = 1635 End Begin Label Label4 BackColor = &H00C0C0C0& Caption = " " Height = 255 Left = 1845 TabIndex = 8 Top = 255 Width = 1530 End Begin Label Label1 BackColor = &H00C0C0C0& Caption = "Windows directory:" Height = 255 Index = 0 Left = 200 TabIndex = 0 Top = 255 Width = 1710 End DefInt A-Z Dim ReadString As String * 255 Function CheckLen () CheckLen = False If Len(Text2.Text) > 12 Then MsgBox "Not a valid filename. You must specify a legal DOS file name for this field. For example: SYSTEM01.VGA", 0, "File Name Too Long": Text2.SetFocus : CheckLen = True End Function Sub Combo1_Click () Text1.Text = ConfigName(Combo1.ListIndex + 1) Text2.Text = ConfigFile(Combo1.ListIndex + 1) End Sub Sub Command1_Click (Index As Integer) HandOff = True If CheckLen() = True Then Exit Sub If WASRECORDCHANGED = False Then Config.Hide : Exit Sub If Index = 0 Then WritProf If Index = 1 Then ReadProf: Reload: HandOff = False WASRECORDCHANGED = False Config.Hide End Sub Sub Form_Load () Combo1.AddItem ConfigName(1) Combo1.AddItem ConfigName(2) Combo1.AddItem ConfigName(3) Combo1.AddItem ConfigName(4) Combo1.AddItem ConfigName(5) WASRECORDCHANGED = False End Sub Sub Form_Paint () Autoredraw = True Call Frame(Config, Text1.Left - 30, Text1.top - 30, Text1.Height + 60, Text1.Width + 60) Call Frame(Config, Text2.Left - 30, Text2.top - 30, Text2.Height + 60, Text2.Width + 60) Call Frame(Config, 60, Label3.top + Label3.Height + 30, 20, Config.Width - 300) Call Frame(Config, 60, Label3.top - 60, 20, Config.Width - 300) Call Frame2(Config, 60, 60, Config.Height - 560, Config.Width - 284) Call Frame(Config, Combo1.Left - 5, Combo1.top - 5, Combo1.Height + 10, Combo1.Width + 10) End Sub Sub Reload () Combo1.RemoveItem 0 Combo1.RemoveItem 0 Combo1.RemoveItem 0 Combo1.RemoveItem 0 Combo1.RemoveItem 0 Combo1.AddItem ConfigName(1) Combo1.AddItem ConfigName(2) Combo1.AddItem ConfigName(3) Combo1.AddItem ConfigName(4) Combo1.AddItem ConfigName(5) End Sub Sub Text1_GotFocus () Text1.SelStart = 0& Text1.SelLength = Len(Text1.Text) End Sub Sub Text1_KeyPress (keyascii As Integer) WASRECORDCHANGED = True End Sub Sub Text1_LostFocus () If Text1.Text = Combo1.Text Then Exit Sub WASRECORDCHANGED = True If Config.VISIBLE = False Then Exit Sub x = Combo1.ListIndex Combo1.RemoveItem x Text$ = Text1.Text ConfigName(x + 1) = Text$ Combo1.AddItem Text$, x Combo1.ListIndex = x Combo1.Refresh End Sub Sub Text2_GotFocus () Text2.SelStart = 0& Text2.SelLength = Len(Text2.Text) End Sub Sub Text2_LostFocus () x = Combo1.ListIndex + 1 Text$ = Text2.Text If CheckLen() = True Then Exit Sub If Text$ = ConfigFile(x) Then Exit Sub WASRECORDCHANGED = True ConfigFile(x) = Text$ End Sub